package 事务练习.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import 事务练习.entity.TbUser;

/**
 * @author caihe
 * @date 2021/6/2 10:37
 */
public interface UserDao {

    @Insert("insert into tb_user(user_name, user_pwd) values(#{userName}, #{userPwd})")
    void addUser(@Param("userName") String userName, @Param("userPwd") String userPwd);
    
    @Select("select * from tb_user where user_name = #{userName}")
    TbUser selectUser(@Param("userName") String userName);

}
